![]() | ![]() | ![]() | ![]() | ![]() |
An %IF statement in open code inserts additional semicolons into submitted code after resolution when the following conditions are met:
The behavior can be illustrated after you submit the following sample macro:
When the macro is called in open code and its input parameter (VAR) contains an %IF test that resolves to TRUE, the correct results are generated, as shown in the SAS® log here:
However, if you submit the macro with an %IF test that resolves to FALSE, additional semicolons are generated in the code:
A workaround is to modify the logic of the code so that the %ELSE branch is not used. A further code modification is to not use an %IF statement in open code.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | Base SAS | z/OS | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 |
z/OS 64-bit | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft® Windows® for x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows 8 Enterprise x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows 8 Pro x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows 8.1 Enterprise x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows 8.1 Pro 32-bit | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows 8.1 Pro x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows 10 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows Server 2008 R2 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows Server 2008 for x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows Server 2012 Datacenter | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows Server 2012 R2 Datacenter | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows Server 2012 R2 Std | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Microsoft Windows Server 2012 Std | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Windows 7 Enterprise x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Windows 7 Professional x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
64-bit Enabled AIX | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
64-bit Enabled Solaris | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
HP-UX IPF | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Linux for x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 | ||
Solaris for x64 | 9.4 | 9.4_M8 | 9.4 TS1M0 | 9.4 TS1M8 |